/**
 * $Id: UserServiceFacadeImpl.java 19 2011-06-11 04:06:06Z feigme $
 */
package com.iary.application.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.iary.application.UserServiceFacade;
import com.iary.domain.model.user.User;
import com.iary.domain.model.user.UserExistedException;
import com.iary.domain.service.UserService;
import com.iary.infrastructure.orm.Page;

@Service
@Transactional
public class UserServiceFacadeImpl implements UserServiceFacade {

	@Autowired
	private UserService userService;

	public Long register(String email, String userName, String password)
			throws UserExistedException {
		return userService.registerUser(email, userName, password);
	}

	public Page<User> findAll(Page<User> page) {
		return userService.findAllUser(page);
	}

}
